function clean(id){
	$('#sellClean_form').append("<input type='hidden' name='sellDTO.id' value='"+id+"' />");
	var c = confirm("是否要取消卖出？");
	if(c){
		$('#sellClean_form').submit();
	}
}


function buy(id){
	$('#buy_form').append("<input type='hidden' name='sellDTO.id' value='"+id+"' />");
	var c = confirm("是否确定要买入，买入后不允许取消？");
	if(c){
		$('#buy_form').submit();
	}
}


function confirmPayment(id){
	$('#confirmPayment_form').append("<input type='hidden' name='sellDTO.id' value='"+id+"' />");
	var c = confirm("请确认是否已收到款项？");
	if(c){
		$('#confirmPayment_form').submit();
	}
}


function sellConfirm(){
	var sellmoney = $("#sellmoney").val();
	if(isNaN(sellmoney)){
		alert('请输入正确的数值！');
	}else{
		if(sellmoney%1000==0) {
			 if(parseInt(sellmoney)>=1000){
				 $("#sell_form").submit();
			 }else{
				 alert('金额不能小于1000元');
			 }
		 }else{
			 alert("请输入1000的倍数");
		 }
	}
	
}


function insellConfirm(){
	var sellmoney = $("#sellmoney").val();
	if(isNaN(sellmoney)){
		alert('请输入正确的数值！');
	}else{
		if(sellmoney%100==0) {
			 if(parseInt(sellmoney)>=100){
				 var c = confirm("确认是否要提交充值？");
					if(c){
						$("#sell_form").submit();
					}
			 }else{
				 alert('金额不能小于100元');
			 }
		 }else{
			 alert("请输入100的倍数");
		 }
	}
	
}

function markAlreadyPayment(id){
	$('#markAlreadyPayment_form').append("<input type='hidden' name='sellDTO.id' value='"+id+"' />");
	var c = confirm("请确认是否已给对方付款？");
	if(c){
		$('#markAlreadyPayment_form').submit();
	}
}

function inConfirmPayment(id){
	$('#inConfirmPayment_form').append("<input type='hidden' name='sellDTO.id' value='"+id+"' />");
	var c = confirm("请确认是否已收到款项？");
	if(c){
		$('#inConfirmPayment_form').submit();
	}
}